<?php

class indexController extends Controller{

    public function __construct($vars) {
        parent::__construct($vars);
    }
    
    public function index(){
        $search = isset($_GET['search'])?$_GET['search']:"";
        $page   = isset($_GET['page'])  ?$_GET['page']  :"1";
        $this->LoadModel("search/index", 'sobj');
        $this->registerVar('resultados', $this->sobj->search($search, $page));
        $this->registerVar('keyword'   , $search);
        $this->display('search/index/index');
    }
    
    public function testar(){
        //$this->LoadModel('search/Config/search_populator', 'pop');
        //$this->pop->populate();
        $this->LoadModel('search/documento', 'doc');
        
        $palavras = "O sol e sua radiação nociva a saúde mas a nebulosa de andrômeda tem mais radiação";
        $this->doc->search($palavras, "search/populator");
    }

}

?>
